% AppGUI.m
% GUI 负责显示和交互界面
classdef AppGUI < handle
    properties
        figureHandle
        buttonHandle
        textArea
    end
    
    methods
        function obj = AppGUI()
            % 创建 GUI 界面
            obj.figureHandle = figure('Name', 'Text File Viewer', 'Position', [300, 300, 400, 300]);
            obj.buttonHandle = uicontrol('Style', 'pushbutton', 'String', 'Load File', ...
                                         'Position', [150, 220, 100, 30]);
            obj.textArea = uicontrol('Style', 'edit', 'Max', 2, 'Position', [50, 50, 300, 150], ...
                                     'HorizontalAlignment', 'left');
        end
        
        function run(obj)
            % 运行 GUI，等待用户交互
            uiwait(obj.figureHandle);
        end
    end
end
